<!DOCTYPE html>
<!--[if IE 8]>			<html class="ie ie8"> <![endif]-->
<!--[if IE 9]>			<html class="ie ie9"> <![endif]-->
<!--[if gt IE 9]><!-->	<html> <!--<![endif]--><head>
    <meta charset="utf-8">
    <title>{$menu.menu_seo_title|default=$site_seo_title} {$site_name}</title>
    <meta name="keywords" content="{$menu.menu_seo_key|default=$site_seo_keywords}" />
    <meta name="description" content="{$menu.menu_seo_des|default=$site_seo_description}">
    {include file="public:head" /}
    
<style>
	.carousel-control .fa-chevron-left, .carousel-control .fa-chevron-right{
		position: absolute;
		top: 50%;
		z-index: 5;
		display: inline-block;
		margin-left:-5px
	}
	.goods_attr{ font-size:16px;}
	.goods_attr li{ padding:5px}
	.goods_attr li a{ margin:0; font-size:16px}
	.goods_attr li.price{ color:red;}
	.goods_attr li.price b{ font-size:24px; font-family:"微软雅黑"}
	.goods_attr li.buy{padding:12px 5px;}
	.goods_attr li.buy button{ font-size:18px}
	.goods_attr li .bdsharebuttonbox a{ margin:0 2px}
	.plus_btn ,.minus_btn{ color:#aaa}
	.plus_btn:focus, .plus_btn:hover, .minus_btn:focus, .minus_btn:hover {
		color: #666;
	}
	.goodnumber{width:50px; text-align:center; color:#666}
</style>
</head>
<body class="page">
<div class="wrap">
    {include file="public:nav" /}
    <div id="main-cmf">
        <div class="breadcrumb-wrapper">
            <div class="container">
                <div class="row page-title">
                    <div class="col-lg-12 col-md-12 col-xs-12 col-sm-6">
                        <h1 class="title">{$goods["goods_title"]}</h1>
                        <div>
                        
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="content">
            <div class="container">
                <div class="row">
                    <div class="posts-block col-lg-9 col-md-9 col-sm-8 col-xs-12">
                        <article class="post hentry">
                            <div class="post-content clearfix" style="margin-top:30px">
                                <div class="pull-left" style="width:50%">
                                	<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
                                      
                                      <!-- Wrapper for slides -->
                                      <div class="carousel-inner" role="listbox">
                                         {notempty name="$goods['thumb']"}
                                        <div class="item active">
                                          <img src="{$goods["thumb"]}" alt="1">
                                        </div>
                                      {/notempty}
                                      {volist name="goods['img_list']" id="img" key="k"}
                                          <div class="item  ">
                                           <img src="{$img}"> 
                                          </div>
                                        {/volist}
                                      </div>
                                      <!-- Controls -->
                                      <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
                                        <span class="fa fa-chevron-left" aria-hidden="true" ></span>
                                      </a>
                                      <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
                                        <span class="fa fa-chevron-right" aria-hidden="true" ></span>
                                      </a>
                                    </div>
                                </div>
                                <form action="{:url("home/order/buy")}" method="post" id="orderbug" onSubmit="return checkorderform(this);">
                                <ul class="pull-left goods_attr" style="padding:0 20px">
                                	<li>
                                    	<span>分类 : <a href="{:url('home/shop/index',["cate"=>$goods["cid"]])}" class="blog-entry-meta-author">{$goods["cate_name"]}</a></span>
                                    </li>
                                    <li>
                                    	<span>原价 : <del>￥{$goods["price"]}</del></span>
                                    </li>
                                    <li class="price">
                                    	<span>价格 : <b>￥{if condition="empty($goods['price_'.$groupid])"}{$goods["price"]} {else/}{$goods["price_".$groupid]} {/if}</b></span>
                                    </li>
                                    <li>
                                    	<span>数量 : 
                                        <a href="javascript:void(0);" class="fa fa-plus-square plus_btn"></a>&nbsp;
                                        <input type="text" name="number" class="goodnumber" value="1" onKeyUp="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" maxlength="4">&nbsp;
                                        <a href="javascript:void(0);" class="fa fa-minus-square minus_btn"></a>
                                        </span>
                                    </li>
                                    <li class="buy">
                                    <input type="hidden" id="id" name="id" value="{$goods["id"]}">
                                    <button type="submit" class="btn btn-warning"> <i class="fa fa-shopping-cart"></i> 立即购买 </button>
                                    <!--button type="button" class="btn btn-success"> <i class="fa fa-shopping-cart"></i> 加入购物车</button-->
                                    </li>
                                    <li>
                                        <div class="bdsharebuttonbox">
                                        <a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
                                        </div>
                                        <script>
                                        window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": "0", "bdSize": "24" }, "share": {} }; 
                                        with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];
                                        </script>
                                    </li>
                                </ul>
                                </form>
                            </div>
                            <div class="reply" style="margin-top:20px">
                                <h3 class="title">商品介绍</h3>
                            </div>
                            <div class="pagination-centered">
                                {$goods["content"]}
                            </div>
                            
                            <div>
                               
                                <div class="clearfix"></div>
                            </div>
                        </article>
						
						
                    </div>
                    <div class="sidebar col-lg-3 col-md-3 col-sm-4 col-xs-12">
                    {include file="public:rightgoods"/}
                    </div>
                </div>
            </div>
        </div>
    </div>
    {include file="public:footer"/}
</div>
{include file="public:scripts"/}
<script language="javascript">
  $(function(){
      $(".menu a[href='{:url('home/shop/index')}']").attr('id','current');
  });
</script>
<script>
function checkorderform(o){
	return true;	
}
$(function(){
	$(".plus_btn").click(function(){
		var o = $(this).next();						  
		var number = o.val();							  
		if(isNaN(number)){
			o.val(1);		
		}else{
			if(number.length<4){
				number++;
				o.val(number);
			}
		}
	});		
	
	$(".minus_btn").click(function(){
		var o = $(this).prev();						   
		var number = o.val();							  
		if(isNaN(number)){
			o.val(1);		
		}else{
			if(number>1){
				number--;
				o.val(number);
			}
		}
	});
	
})
</script>
</body>
</html>